/*
	下载歌曲封面
 */

#import <Foundation/Foundation.h>
#import "Song.h"

@protocol ImageDownloaderDelegate;

@interface ImageDownloader : NSObject

@property (nonatomic, retain) Song *song;
@property (nonatomic, retain) NSIndexPath *indexPathInTableView;
@property (nonatomic, assign) id <ImageDownloaderDelegate> delegate;

@property (nonatomic, retain) NSMutableData *activeDownload;
@property (nonatomic, retain) NSURLConnection *imageConnection;

- (void)startDownload;
- (void)cancelDownload;

@end

@protocol ImageDownloaderDelegate 

- (void)imageDidLoad:(NSIndexPath *)indexPath;

@end
